﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI.DonDatHangCuaKhachHang
{
    public partial class frmQuanLy : Form
    {
        public frmQuanLy()
        {
            InitializeComponent();
        }

        private Entities.DonDatHangKH[] addhkh;
        private void frmQuanLy_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
        }
        #region Method
        void Select()
        {
            addhkh = Common.StaticVariable.InterfaceObject.SelectDonDatHangKH();
            if (addhkh == null)
                addhkh = new Entities.DonDatHangKH[0];
            dgvHienThi.DataSource = addhkh;
            Fixdgv();
        }

        void Fixdgv()
        {

        }
        #endregion

        private void txtTimKiem_TextChanged(object sender, EventArgs e)
        {
            dgvHienThi.DataSource = addhkh.Where(a => a.MaDonDatHangKH.IndexOf(txtTimKiem.Text.Trim()) >= 0);
        }
    }
}
